<%
  Public Function AesEncode(ByVal key, ByVal content)
    Dim aes
    Set aes = new AesClass

    With aes
      .Key = key
      .IV = key 'cbc mode only
      .Mode = "cbc"
      .Padding = "pkcs5"
      .Encoding = "utf-8"
    End With
    
    AesEncode = aes.Encode(content)
    Set aes = Nothing
  End Function
  
  Public Function AesDecode(ByVal key, ByVal encodedContent)
    Dim aes
    Set aes = new AesClass

    With aes
      .Key = key
      .IV = key 'cbc mode only
      .Mode = "cbc"
      .Padding = "pkcs5"
      .Encoding = "utf-8"
    End With
    
    AesDecode = aes.Decode(encodedContent)
    Set aes = Nothing
  End Function
%>
